<?php
	if(isset($_POST["pass"])) {
		$pass = $_POST["pass"];
		$result = "";
		if(strlen($pass) < 5) {
			$result = "Weak";
		}
		elseif(strlen($pass) >= 5) {
			$result = "Good";
		}
		if(preg_match("^(?=.*[!@#$&*])(?=.*[0-9])(?=.*[A-Z])^", $pass)) {
			$result = "Strong";
		}
		$colorR = 255 - 15 * strlen($pass);
		$colorG = 0 + 15 * strlen($pass); 
		echo "<span style='color:rgb($colorR, $colorG, 0)'>$result</span>";
	}
?>